home *** CD-ROM | disk | FTP | other *** search
-
-
- ; $VER: ST_Font.bb2 v1.1 (29.08.2000)
-
- ; Author: Damir Arh
- ; E-mail: damir.arh@telesat.si
- ; WWW: http://damir.gajba.net/
-
- ; This source code is completely free. You can redistribute
- ; and/or modify it without any restrictions whatsoever.
-
-
- ;------------------------------------------------------------
-
- ; This is a short program that converts 'ST_Font.iff' into
- ; 'ST_Font.dat' for use with 'Scroll Text' routines.
-
- ; The program should be run from the directory, where the
- ; picture is located. Look at 'ScrollText.asc' for more
- ; info.
-
- ;------------------------------------------------------------
-
- #ST_Characters=41 ; number of font characters
-
- WBStartup ; enable start from WB
-
- ; some info
- NPrint ""
- NPrint "ST_Font v1.1 (29.08.2000)"
- NPrint ""
- NPrint "Author: Damir Arh"
- NPrint "E-mail: damir.arh@telesat.si"
- NPrint "WWW: http://damir.gajba.net/"
- NPrint ""
-
- ; get the data
- NPrint ""
- NPrint "Input picture data:"
- NPrint ""
- Print "Width (default 320) : "
- ST_FontWidth.w=Edit(4)
- Print "Height (default 256) : "
- ST_FontHeight.w=Edit(4)
- Print "Depth (default 5) : "
- ST_FontDepth.b=Edit(2)
- Print "Font size (default 16): "
- ST_Size.b=Edit(3)
- NPrint ""
-
- ;set the default data
- If ST_FontWidth=0 Then ST_FontWidth=320
- If ST_FontHeight=0 Then ST_FontHeight=256
- If ST_FontDepth=0 Then ST_FontDepth=5
- If ST_Size=0 Then ST_Size=16
-
- ;get the picture
- BitMap 0,ST_FontWidth,ST_FontHeight,ST_FontDepth
- If Exists("ST_Font.iff")
- LoadIFF "ST_Font.iff",0
- Else
- NPrint "Can't find the picture. Quiting..."
- NPrint ""
- End
- EndIf
-
- x.w=0 : y.w=0
- For i.b=0 To (#ST_Characters-1) ; get the characters
- ; from the picture
- GetaShape i,x,y,ST_Size,ST_Size
-
- x=x+ST_Size
- If x+ST_Size>ST_FontWidth
- x=0 : y=y+ST_Size
- EndIf
-
- Next i
-
- SaveShapes 0,#ST_Characters,"ST_Font.dat" ; save data
-
- End
-
-